import service from "./service.js";


export default {
    getList(userId,flowType) {
        return service({
            url: '/system/approve/getAppByRelease?userNameId='+userId+'&flowType='+flowType,
        });
    },
    // 通过审批
    approve(item, userNameId) {
        const params = {
            flowType:0,
            autoId:item.autoId,
            cursTepId:item.stepId,
            autoExecute:item.autoExecute,
            userNameId:userNameId
        }
        return service({
            url: '/system/approve/sendFlow',
            params: params
        });
        
    },
    //退回审批
    reject(item, userNameId) {
        const params = {
            flowType:1,
              autoId:item.autoId,
              cursTepId:item.stepId,
            autoExecute:item.autoExecute,
            userNameId:userNameId
        }
        return service({
            url: '/system/approve/sendFlow',
            params: params
        });
    }
}